﻿/**
 *
 * @file NCTDialogMultiple.h
 * @brief  多重声学包对话框声明
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-16
 *
 */
#ifndef __GUINCTDialogMultiple_H__
#define __GUINCTDialogMultiple_H__

#include "AbstractPhysicsDialog.h"

class QComboBox;

namespace Ui
{
    class NCTDialogMultiple;
}

namespace Acoustics
{
    class FITKAcousticsNCTMultipleNoiseWeight;
}

namespace GUI
{
    /**
     * @brief  多重声学包对话框
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-11
     */
    class GUIPhyscisDialogAPI NCTDialogMultiple : public AbstractMaterialDialog
    {
        Q_OBJECT
    public:
        /**
         * @brief Construct a new NCT Dialog object
         * @param[i]  type           操作类型
         * @param[i]  nctid          声学包ID
         * @param[i]  parent         父对象
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        explicit NCTDialogMultiple(PhysicsDlgExecType type, int nctid = -1, QWidget* parent = nullptr);
        /**
         * @brief Destroy the NCT Dialog object
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        virtual ~NCTDialogMultiple();

    private slots:
        /**
         * @brief 确认按钮点击事件
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief 取消按钮点击事件
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief 删除按钮槽函数
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        void on_pushButton_delete_clicked();
        /**
         * @brief 编辑按钮槽函数
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        void on_pushButton_edit_clicked();
        /**
         * @brief 添加按钮槽函数
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-18
         */
        void on_pushButton_add_clicked();
        /**
         * @brief 复制按钮槽函数
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-18
         */
        void on_pushButton_copy_clicked();

    private:
        /**
         * @brief 初始化窗口
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void init();
        /**
         * @brief 检查输入
         * @return true  输入没有错误
         * @return false  输入有错误
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        bool checkInput();
        /**
         * @brief 更新表格
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        void refreshTableWidget();
        /**
         * @brief 更新覆盖率和面积
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        void refreshCoverageArea();
    private:
        /**
         * @brief UI对象
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        Ui::NCTDialogMultiple *_ui{};
        /**
         * @brief  临时存储对象
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        QList<Acoustics::FITKAcousticsNCTMultipleNoiseWeight*> _dataList{};
    };
}
#endif